package com.springboot.demo.controller;

import com.springboot.demo.entity.Users;
import com.springboot.demo.service.UsersService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * (Users)
 *
 * @author penghui
 * @since 2019-10-14 15:39:12
 */
@Slf4j
@RestController
@RequestMapping("/userTest01")
@Api(tags = "UsersController  controller")
public class UsersControllerTest01 {
   
    @Autowired
    private UsersService usersService;

    @GetMapping("/{id}")
    public Users getUser(@PathVariable Integer id){
        log.info("默认数据库test01");
        return usersService.getById(id);
    }

}